package cn.kgc.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/2/22
 * @Description:
 */
@RestController
@RequestMapping("config")
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public class ConfigClientController {

    @Value("${age}")
    private Integer age;

    @RequestMapping("m1")
    public String method1(){

        return "age=" +age;
    }
}
